PDF Xpress for ActiveX - User Guide > How To > View PDF |
ImagXpress® can be used in conjunction with PDF Xpress™ to display PDF pages. Assign bitmaps rendered using PDF Xpress to an ImagXpress object to leverage its image-viewing features.
To view a PDF document page:
VB Example |
Copy Code
|
---|---|
'This code demonstrates viewing a PDF file On Error GoTo error Dim imagXpress1 As ImagXpress Dim pdfxpress1 As PdfXpress pdfxpress1.Initialize pdfxpress1.RaiseExceptions = True Dim document As New PdfDocument document.SetParentControl pdfxpress1 document.OpenDocument "C:\test.pdf","" Dim renderOpts As New RenderOptions rendOptions.HorizontalResolution = 300 rendOptions.VerticalResolution = 300 imagXpress1.hDIB = document.RenderPageOptionsToDib(0, rendOptions) . . . GoTo finish error: MsgBox Err.Description finish: Set document = Nothing pdfxpress1.Terminate Set pdfxpress1= Nothing |